Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

2.9K
Vistas
Unable to compile JDK 17 using Maven 3.8: error: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module

I am trying to compile an existing Spring Boot project using JDK 17 and Maven 3.8.4 and I keep getting this error.

Unable to make field private com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs accessible: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module @521e3470

The problem also occurs with older versions of Maven like 3.6. It also happens with JDK 16. It does not matter what version of Java is configured in the pom.xml via the java.version, maven.compiler.source, and maven.compiler.target. only the JDK version being used to do the compiling... displayed in the mvn -v command.

The project compiles fine using JDK 15. The error happens immediately when compiling starts, right after the INFO message stating how many classes are being compiled. Happens in both my Windows laptop and Ubuntu CI server.

Any ideas what this could be?

EDIT: adding more of the POM file.

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.4</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>15</java.version>
    <maven.compiler.source>15</maven.compiler.source>
    <maven.compiler.target>15</maven.compiler.target>
    <spring-cloud.version>2020.0.4</spring-cloud.version>
    <ch.qos.logback.version>1.2.3</ch.qos.logback.version>
</properties>

EDIT: i also use Lombok

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.4</version>
    </dependency>

EDIT: I dont think this is the same question as the other one because I searched by error msg, and that other question never popped up in the results. To arrive to that question, you need to know that the error is related to Lombok. The error gives no clue to Lombok being the culprit.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The problem is the usage of lombok project which in this case being used not the most recent version.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda